List Subfolders

Returns folders and their sub folders recursively in trash. The top level folders under trash are returned as a ListResult. Those top level folders are populated with their sub folders, which in turn are populated with their own sub folders. All folders, i.e. heterogeneous folders, calendars, forums,..., in trash are contained in the returned hierarchy. Only Trash.EMPTY_WITH_SUBFOLDERS, Trash.BASIC_WITH_SUBFOLDERS, and Trash.META_WITH_SUBFOLDERS can be specified as Projection. An IllegalArumentException will be thrown if other Projection is used. Client codes need to distinguish different types of Folder to get sub-folders.

Example:

 
 WorkspaceControl wspcControl = ControlLocator.getInstance().getControl(WorkspaceControl.class); 
 TrashHandle trashHandle = ...
 ListResult trashFlds = wspcControl.listTrashItems(trashHandle, Trash.BASIC_WITH_SUBFOLDERS);
 for(Folder trashFld : trashFlds) {
    if (trashFld instanceof HeterogeneousFolder) {
      ListResult subFolders = ((HeterogeneousFolder)trashFld).getSubFolders() ;
    } else if (trashFld instanceof AddressBook) {
      ListResult addrBooks = ((AddressBook)trashFld).getSubAddressBooks();
    } else if (trashFld instanceof Forum) {
      ListResult subForums = ((Forum) trashFld).getSubForums();
      ListResult topics = ((Forum) trashFld).getTopics();
    } else if (trashFld instanceof Topic) {
      // no sub folders under a topic
    }
 ...
 


listResult listTrashSubfolders( beeId trashHandle , Projection projection )

Parameters

trashHandle
Type: beeId workspace trash handle
projection
ProjectionWrapper